<?xml version='1.0' encoding='utf-8' ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output encoding="iso-8859-1" omit-xml-declaration="yes"/>
	<xsl:template match="html">
		<rss version="2.0">
		<channel>
			<title><xsl:value-of select="head/title" /></title>
			<link>http://www.zpoo.com</link>
			<description>Latest comics!</description>
			<ttl>120</ttl>
			<xsl:apply-templates select="body" />
		</channel>
		</rss>
	</xsl:template>

	<xsl:template match="body">
		<xsl:apply-templates select="div" />		
	</xsl:template>

	<xsl:template match="div">
		<xsl:if test="@id='comichot'">
			<xsl:apply-templates select="ul" />
		</xsl:if>
		<xsl:apply-templates select="div"/>
	</xsl:template>

	<xsl:template match="ul">
		<item>
			<title>
				<xsl:value-of select="li[2]/a" /><xsl:text> </xsl:text><xsl:value-of select="li[3]" />
			</title>
			<link><xsl:value-of select="li[1]/a/@href" /></link>
			<guid isPermaLink="false"><xsl:value-of select="li[1]/a/@href" />/<xsl:value-of select="li[4]" /></guid>
			<description>
				&lt;p&gt;
				&lt;img width='60' height='80' align='left' src='<xsl:value-of select="li[1]/a/img/@src" />'/&gt;
				<xsl:value-of select="li[2]/a" />&lt;br/&gt;
				<xsl:value-of select="li[3]" />&lt;br/&gt;
				<xsl:value-of select="li[4]" />&lt;br/&gt;
				&lt;/p&gt;
			</description>
		</item>
	</xsl:template>
</xsl:stylesheet>
